part of 'card_info.dart';

class AudioCardInfo extends Equatable implements CardInfo {
  AudioCardInfo({
    String? cardId,
    required this.lexicalItem,
    required this.safeToPronounce,
    required this.hintUsed,
  }) : cardId = cardId ?? UuidGenerator().generateUuid();

  @override
  final String cardId;

  final LexicalItem lexicalItem;
  final bool safeToPronounce;
  final bool hintUsed;

  @override
  List<Object?> get props {
    return [
      cardId,
      lexicalItem,
      safeToPronounce,
      hintUsed,
    ];
  }

  AudioCardInfo copyWith({
    LexicalItem Function()? lexicalItem,
    bool Function()? safeToPronounce,
    bool Function()? hintUsed,
  }) {
    return AudioCardInfo(
      cardId: cardId,
      lexicalItem: lexicalItem == null ? this.lexicalItem : lexicalItem(),
      safeToPronounce: safeToPronounce == null ? this.safeToPronounce : safeToPronounce(),
      hintUsed: hintUsed == null ? this.hintUsed : hintUsed(),
    );
  }
}
